GPSPIPE(1) | GPSD Documentation | GPSPIPE(1) |
NAME¶
gpspipe - tool to connect to gpsd and retrieve sentences
SYNOPSIS¶
gpspipe [OPTIONS] [server[:port[:device]]]
gpspipe -h
gpspipe -V
NOTE¶
Eurolinux support for this package is limited. %{note2}
DESCRIPTION¶
gpspipe is a tool to connect to gpsd and output the received sentences to stdout. This makes the program useful as a pipe from gpsd to another program or file.
gpspipe does not require root privileges, and can be run concurrently with other tools connecting to the local gpsd without causing problems.
The output will consist of one or both of the raw NMEA or native gpsd sentences. Each line can be optionally time stamped. There is also an option to exit gracefully after a given count of packets.
gpspipe may be run as a daemon, but requires the -o, --output flag for writing the output to a file.
OPTIONS¶
-?, -h, --help
-2, --split24
-B, --nobuffer
-d, --daemonize
-D LVL, --debug LVL
-l, --sleep
-n COUNT, --count COUNT
-o FILE, --output FILE
-p, --profile
-P, --pps
-r, --nmea
-R, --raw
-s DEV, --serial DEV
-S, --scaled
-t, --timestamp
-T FMT, --timefmt FMT
-u, --usec
-v, --spinner
-V, --version
-w, --json
-x SEC, --seconds SEC
-Z, --zulu
At least one of -R, -r or -w must be specified.
You must use -o if you use -d.
ARGUMENTS¶
By default, clients collect data from the local gpsd daemon running on localhost, using the default GPSD port 2947. The optional argument to any client may override this behavior: [server[:port[:device]]]
For further explanation, and examples, see the ARGUMENTS section in the gps(1) man page
EXAMPLES¶
When gpsd is running, this example will send one hundred raw NMEA sentences to standard output, then exit:
$ gpspipe -r -n 100
When gpsd is running, this example will wait at most 5 seconds for a TPV message, print it to stdout, then exit:
$ gpspipe -x 5 -w|sed -n '/TPV/{p;q}'
Use gpspipe and "socat* to serve NMEA from the local gpsd on tcp port 2948:
$ socat EXEC:'gpspipe -r' TCP-LISTEN:2948,reuseaddr,fork
The paranoid may wish to have socat run as user 'nobody' and only accept connections from the local network. Using the -B" option to *gpspipe will reduce latency and jitter The "su=nobody" means this must be run as root:
# socat EXEC:'gpspipe -rB' \
TCP-LISTEN:2948,reuseaddr,fork,su=nobody,range=192.168.0.0/24
RETURN VALUES¶
0
1
SEE ALSO¶
RESOURCES¶
Project web site: <https://gpsd.io/>
COPYING¶
This file is Copyright 2013 by the GPSD project
SPDX-License-Identifier: BSD-2-clause
AUTHOR¶
Gary E. Miller
2023-01-10 | GPSD, Version 3.25 |